<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>Debugging: Watches Window</title>
<link rel="stylesheet" href="ide.css" title="Oracle BLAFDoc" type="text/css"/>
</head>

<body>
<p><a id="NetbeansDebuggerWatchNode" name="NetbeansDebuggerWatchNode"></a></p>
<div id="NBCSH2751"><!-- infolevel="all" infotype="General" --><a id="sthref357" name="sthref357"></a>
<h1>Debugging: Watches Window</h1>
<a name="BEGIN" id="BEGIN"></a>
<p>The Watches window lists all variables and expressions that you have specified to watch while debugging. By default, the Watches window opens automatically whenever you start a debugging session. You can open the Watches window by choosing <b>Window &gt; Debugging &gt; Watches</b>. 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG889">
<param name="text" value="<html><u>How?</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p>If you open the Watches window when a debugging session is running, it closes automatically when you end the debugging session. If you open the window when no debugging session is running, it stays open until you close it.</p>
<p>The information given for each watch includes the variable or expression name, type, and value. If the variable has a control to its left, you can click the control to expand or collapse the object. If the object type is displayed in blue underlined text, clicking the text jumps to the object type in the source code. You can click in the Value cell to edit the value directly in the Watches window.</p>
<p>When you add a new variable or expression to the Watches window, the value of the variable or expression is immediately evaluated and displayed. The value of a watch is based on the current context. As you move through your program code, the Watches window is updated to show the value of the watch for that context.</p>
<p>In some cases, the debugger assigns a pound sign (#) and a number as the variable's value. This number is a unique identifier of the given instance. You can use this identifier to determine if a variable points to the same or to a different instance. You cannot edit this value.</p>
<a id="NBCSH2752" name="NBCSH2752"></a>
<p><b>Icons</b></p>
<p>The Watches window displays the following thread icons:</p>

<table summary="Descriptions of Watches window icons." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="24%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t32">Element</th>
<th align="left" valign="bottom" id="r1c2-t32">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t32" headers="r1c1-t32">
<p><img width="16" height="16" src="img/watch.gif" alt="Watch icon" title="Watch icon" /></p></td>
<td align="left" headers="r2c1-t32 r1c2-t32">Watch object</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t32" headers="r1c1-t32">
<p><img width="16" height="16" src="img/fixedwatch.gif" alt="Fixed Watch icon" title="Fixed Watch icon" /></p></td>
<td align="left" headers="r3c1-t32 r1c2-t32">Fixed watch object</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t32" headers="r1c1-t32">
<p><img width="16" height="16" src="img/supervariable.gif" alt="Static Field icon" title="Static Field icon" /></p>
</td>
<td align="left" headers="r4c1-t32 r1c2-t32">Container for a superclass</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t32" headers="r1c1-t32">
<p><img width="16" height="16" src="img/staticvariable.gif" alt="Static Field icon" title="Static Field icon" /></p>
</td>
<td align="left" headers="r5c1-t32 r1c2-t32">Static field of an object</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t32" headers="r1c1-t32">
<p><img width="16" height="16" src="img/field.gif" alt="Non-Static Field icon" title="Non-Static Field icon" /></p></td>
<td align="left" headers="r6c1-t32 r1c2-t32">Non-static field of an object</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<a id="NBCSH2758" name="NBCSH2758"></a>
<p><b>Actions</b></p>
<p>The Watches window has the following commands in the context menus:</p>

<table summary="Descriptions of context menu commands in Watches window." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="31%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t33">Element</th>
<th align="left" valign="bottom" id="r1c2-t33">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t33" headers="r1c1-t33">
<p>Create Fixed Watch</p>
</td>
<td align="left" headers="r2c1-t33 r1c2-t33">Enables you to create a fixed watch for the object. 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG893">
<param name="text" value="<html><u>How?</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t33" headers="r1c1-t33">
<p>New Watch</p>
</td>
<td align="left" headers="r3c1-t33 r1c2-t33">Enables you to create a new watch.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t33" headers="r1c1-t33">Delete</td>
<td align="left" headers="r4c1-t33 r1c2-t33">Removes the selected object from the Watches window.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t33" headers="r1c1-t33">
<p>Delete All</p>
</td>
<td align="left" headers="r5c1-t33 r1c2-t33">Removes all objects from the Watches window.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t33" headers="r1c1-t33">
<p>Customize</p>
</td>
<td align="left" headers="r6c1-t33 r1c2-t33">Opens a dialog box in which you can modify the watch expression.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t33" headers="r1c1-t33">List Options</td>
<td align="left" headers="r7c1-t33 r1c2-t33">Enables you to customize the display of the Watches window, including adding and removing columns of information, reordering the columns, and sorting the columns.</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<a id="NBCSH2763" name="NBCSH2763"></a>
<p><b>Properties</b></p>
<p>To see all the properties for a watch right-click the node for the watch and choose <b>Properties</b>. By default, all properties are also displayed directly in the Watches window, except for the <code dir="ltr">toString()</code> property.</p>
<a id="NBCSH2764" name="NBCSH2764"></a>
<hr><p><b>Related Topics</b></p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG885">
<param name="text" value="<html><u>&quot;Viewing Program Information When Debugging&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG822">
<param name="text" value="<html><u>&quot;Using the Debugger Windows&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG1534">
<param name="text" value="<html><u>&quot;About Developing PHP Applications&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>

<!-- -->
<!-- Start Footer -->


<table summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="86%"><a href="legal_notice.htm">
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.</a>
</td>
</tr>
</table>
<!-- -->
</body>
</html>
